import { useState } from "react"

function TestChangeAName(){
  const [name,setname]=useState('tom')
  const changge=()=>{
    setname('测试')
    
  }
  return(
    <div>
      <p>{name}</p>
      <button onClick={changge}>点击修改</button>
    </div>

  )
}
export default TestChangeAName